Skip to content

Fix scalebar location validation#35

Merged
ppinard merged 1 commit intoppinard:masterfrom
SarthakJariwala:fix-location-validation
Jan 9, 2021
Merged

Fix scalebar location validation#35
ppinard merged 1 commit intoppinard:masterfrom
SarthakJariwala:fix-location-validation

Conversation

@SarthakJariwala
Copy link
Copy Markdown
Contributor

The _validate_legend_loc function in the previous PR #33 was missing a return statement so the function returned None.

So, if we update the scalebar location using - matplotilb.rcParams.update({"scalebar.location" : "upper right"}), it will not be updated and will be set to None instead.

This PR fixes that bug by adding a return statement and also adds a new test to check the rcParams updates for all matplotlib_scalebar parameters.

@ppinard
Copy link
Copy Markdown
Owner

ppinard commented Jan 9, 2021

My bad. I didn't know the validate functions need to return the value. Thank you for the PR. I will release a new version (0.7.1) on PyPI shortly.

@ppinard ppinard merged commit 70af376 into ppinard:master Jan 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants